<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <h:panelGrid columns="4">
        <h:outputLabel value="Attachments:" for="attachments"/>
        <h:selectOneMenu id="attachments" value="#{attachmentContainer.selectedAttachment}">
            <f:selectItems value="#{attachmentContainer.attachments}"/>
            <f:ajax render="@form"/>
        </h:selectOneMenu>

        <h:commandButton value="download" immediate="true" disabled="#{attachmentContainer.selectedAttachment == null}">
            <p:fileDownload value="#{attachmentContainer.attachmentFile}"/>
        </h:commandButton>
                
        <h:commandButton value="upload file" immediate="true" disabled="#{not allowAdding}"
                             action="file_upload.xhtml?faces-redirect=true"/>
    </h:panelGrid>     


</ui:composition>
